package com.tledu.mapper;

import com.tledu.domain.Brand;
import org.apache.ibatis.annotations.*;

/**
 * @author cyrus
 */
public interface BrandMapper2 {

    @Insert("insert into tb_brand (brand_name, company_name, ordered, description, status) VALUES " +
            "(#{brandName},#{companyName},#{ordered},#{description},#{status})")
    @Options(useGeneratedKeys = true, keyProperty = "id")
    int insert(Brand brand);

    @Update("update tb_brand set brand_name = #{brandName} , company_name = #{companyName} ,ordered=#{ordered}" +
            ",description=#{description},status=#{status} where id=#{id}")
    int update(Brand brand);

    @Delete("delete from tb_brand where id = #{id};")
    int delete(int id);
}
